[id].vue 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222
  1. <template>
  2. <div>
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 页面导航 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 广告一 -->
  8. <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>
  9. <!-- 当前页面中的一级标题 -->
  10. <div class="nav1">
  11. <div class="inner">
  12. <h2 class="nav1_title">农技推广</h2>
  13. </div>
  14. </div>
  15. <!-- 二级导航列表 -->
  16. <div class="nav2top"></div>
  17. <div class="nav2">
  18. <ul class="inner">
  19. <li class="home">
  20. <a href="#">网站首页</a>
  21. </li>
  22. <li class="titleList" v-for="(item, index) in 8" :key="index">
  23. <NuxtLink to="#">
  24. <span class="nav2_title">养殖技术</span>
  25. </NuxtLink>
  26. </li>
  27. </ul>
  28. </div>
  29. <div class="nav2btm"></div>
  30. <!-- 第一层 -->
  31. <!-- 第一部分 -->
  32. <div class="part1">
  33. <div class="inner">
  34. <div class="part1_left">
  35. <div class="part1_title">
  36. <h2 class="nav_part1_left">
  37. <a href="#">
  38. 乡村招商
  39. </a>
  40. <em></em>
  41. </h2>
  42. </div>
  43. <div class="part1_content">
  44. <div class="context_left">
  45. <div class="top">
  46. <a href="">
  47. <img src="../../public/index/01.png" alt="">
  48. <span class="title1">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  49. </a>
  50. </div>
  51. <div class="bottom">
  52. <div class="bottom_left" v-for="item in 2">
  53. <a href="">
  54. <img src="../../public/index/01.png" alt="">
  55. <span class="title2">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  56. </a>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="context_right">
  61. <ul class="rightContent">
  62. <li class="topTitle1">
  63. <a href="">定调超大特大城市将带来哪些新机遇?专家解读→</a>
  64. </li>
  65. <li class="context1" v-for="item in 4">
  66. <a href="#">
  67. 多地迎新一轮土拍 部分区域出让高溢价地块
  68. </a>
  69. </li>
  70. </ul>
  71. <ul class="rightContent">
  72. <li class="topTitle1">
  73. <a href="">定调超大特大城市将带来哪些新机遇?专家解读→</a>
  74. </li>
  75. <li class="context1" v-for="item in 4">
  76. <a href="#">
  77. 多地迎新一轮土拍 部分区域出让高溢价地块
  78. </a>
  79. </li>
  80. </ul>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="part1_right">
  85. <div class="part1_right_title">
  86. <h2 class="part1_right_title1_active">
  87. <a href="">乡村建设</a>
  88. <em class="active_bg"></em>
  89. </h2>
  90. </div>
  91. <div class="part1_right_content">
  92. <div class="part1_right_content_top" v-for="item in 2">
  93. <NuxtLink to="#">
  94. <img src="../../public/index/01.png" alt="">
  95. <span class="content_top_title2">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  96. </NuxtLink>
  97. </div>
  98. <ul class="part1_right_content_bottom">
  99. <li class="content_bottom_list" v-for="item in 6">
  100. <NuxtLink to="#">
  101. 西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段
  102. </NuxtLink>
  103. </li>
  104. </ul>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- 第二部分 -->
  110. <div class="part2">
  111. <div class="inner">
  112. <div class="part2_left">
  113. <div class="part2_title">
  114. <h2 class="nav_part2_left">
  115. <a href="#">
  116. 乡村招商
  117. </a>
  118. <em></em>
  119. </h2>
  120. </div>
  121. <div class="part2_content">
  122. <div class="part2_content_left">
  123. <ul class="content_a">
  124. <li class="topTitleaa">
  125. <a href="">定调超大特大城市将带来哪些新机遇?专家解读→</a>
  126. </li>
  127. <li class="context111" v-for="item in 4">
  128. <a href="#">
  129. 多地迎新一轮土拍 部分区域出让高溢价地块
  130. </a>
  131. </li>
  132. </ul>
  133. <ul class="content_a">
  134. <li class="topTitleaa">
  135. <a href="">定调超大特大城市将带来哪些新机遇?专家解读→</a>
  136. </li>
  137. <li class="context111" v-for="item in 4">
  138. <a href="#">
  139. 多地迎新一轮土拍 部分区域出让高溢价地块
  140. </a>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="part2_content_right">
  145. <div class="right_top">
  146. <a href="">
  147. <img src="../../public/index/01.png" alt="">
  148. <span class="title11">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  149. </a>
  150. </div>
  151. <div class="right_bottom">
  152. <div class="bottom_left" v-for="item in 2">
  153. <a href="">
  154. <img src="../../public/index/01.png" alt="">
  155. <span class="title22">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  156. </a>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <div class="part2_right">
  163. <div class="part2_right_title">
  164. <h2 class="part2_right_title1_active">
  165. <a href="">乡村建设</a>
  166. <em class="active_bg11"></em>
  167. </h2>
  168. </div>
  169. <div class="part2_right_content">
  170. <div class="part2_right_content_top" v-for="item in 2">
  171. <NuxtLink to="#">
  172. <img src="../../public/index/01.png" alt="">
  173. <span class="content_top_title22">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  174. </NuxtLink>
  175. </div>
  176. <ul class="part2_right_content_bottom">
  177. <li class="content_bottom_list" v-for="item in 6">
  178. <NuxtLink to="#">
  179. 西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段
  180. </NuxtLink>
  181. </li>
  182. </ul>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <!-- 广告二 -->
  188. <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>
  189. <!-- 第二层 -->
  190. <div class="part3">
  191. <div class="inner">
  192. <div class="part3_left">
  193. <div class="part3_left_top">
  194. <div class="part3_leftTitle">
  195. <h2 class="part3_left_title">
  196. <NuxtLink to="#">三农人物</NuxtLink>
  197. <em></em>
  198. </h2>
  199. </div>
  200. <div class="part3_left_content">
  201. <div class="part3_left_content_top">
  202. <div class="content_top_left">
  203. <div class="part3_photo_text">
  204. <NuxtLink to="#">
  205. <img src="../../public/index/01.png" alt="">
  206. <span class="part3_text">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  207. </NuxtLink>
  208. <span class="littleTips">精选</span>
  209. </div>
  210. <ul class="part3_content">
  211. <li class="part3_content_list" v-for="item in 5">
  212. <NuxtLink to="#">
  213. 西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段
  214. </NuxtLink>
  215. </li>
  216. </ul>
  217. </div>
  218. <ul class="content_top_right">
  219. <li class="content_right_list" v-for="item in 5">
  220. <NuxtLink to="#">
  221. <div class="part3_time">
  222. <span class="month">19</span>
  223. <span class="xiegang">/</span>
  224. <span class="day">02</span>
  225. </div>
  226. <div class="time_left_content">
  227. 全链汇聚,稻乐满仓!南沙丝苗米南沙丝苗南沙丝苗米南沙丝苗米
  228. </div>
  229. </NuxtLink>
  230. </li>
  231. </ul>
  232. </div>
  233. </div>
  234. </div>
  235. <div class="part3_left_bottom">
  236. <div class="part3_leftTitle1">
  237. <h2 class="part3_left_title">
  238. <NuxtLink to="#">三农人物</NuxtLink>
  239. <em></em>
  240. </h2>
  241. <h2 class="part3_left_title">
  242. <NuxtLink to="#">三农名企</NuxtLink>
  243. <em></em>
  244. </h2>
  245. </div>
  246. <div class="part3_left_content1">
  247. <div class="content_bottom_left">
  248. <div class="content_top">
  249. <NuxtLink to="#">
  250. <img src="../../public/index/01.png" alt="">
  251. <span class="part3_text">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  252. </NuxtLink>
  253. </div>
  254. <div class="content_bottom">
  255. <div class="content_bottom_1" v-for="item in 2">
  256. <NuxtLink to="#">
  257. <img src="../../public/index/01.png" alt="">
  258. <span class="part3_text">西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  259. </NuxtLink>
  260. </div>
  261. </div>
  262. </div>
  263. <div class="content_bottom_right">
  264. <ul class="bottom_content_1" v-for="item in 2">
  265. <li class="bottom_content_list" v-for="item in 5">
  266. <NuxtLink to="#">
  267. 多地迎新一轮土拍 部分区域出让高溢价地块
  268. </NuxtLink>
  269. </li>
  270. </ul>
  271. </div>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="part3_right">
  276. <div class="part3_rightTitle">
  277. <h2 class="part3_right_title">
  278. <NuxtLink to="#">三农人物</NuxtLink>
  279. <em></em>
  280. </h2>
  281. <div class="rightMore">
  282. <NuxtLink to="#">更多》</NuxtLink>
  283. </div>
  284. </div>
  285. <ul class="part3_right_content_top">
  286. <li class="part3_right_contentlist_top" v-for="(item, index) in 7">
  287. <NuxtLink to="#">
  288. <span class="numStyle">{{ index + 1 }}</span>
  289. 国家发展改革委:依法保护民营企业和民营企业相法保护民营企业和民营企业相
  290. </NuxtLink>
  291. </li>
  292. </ul>
  293. <div class="part3_photo_text_right">
  294. <NuxtLink to="#">
  295. <span class="part3_text11">西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  296. <img src="../../public/index/01.png" alt="">
  297. </NuxtLink>
  298. </div>
  299. <ul class="part3_right_content_11">
  300. <li class="part3_right_contentlist_11" v-for="(item, index) in 2">
  301. <NuxtLink to="#">
  302. 绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动
  303. </NuxtLink>
  304. </li>
  305. </ul>
  306. <div class="part3_photo_text_right">
  307. <NuxtLink to="#">
  308. <span class="part3_text11">西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  309. <img src="../../public/index/01.png" alt="">
  310. </NuxtLink>
  311. </div>
  312. <ul class="part3_right_content_11">
  313. <li class="part3_right_contentlist_11" v-for="(item, index) in 2">
  314. <NuxtLink to="#">
  315. 绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动
  316. </NuxtLink>
  317. </li>
  318. </ul>
  319. <div class="part3_photo_text_right">
  320. <NuxtLink to="#">
  321. <span class="part3_text11">西部地区最大高铁枢纽重庆东站进入线路精调阶段西部地区最大高铁枢纽重庆东站进入线路精调阶段</span>
  322. <img src="../../public/index/01.png" alt="">
  323. </NuxtLink>
  324. </div>
  325. <ul class="part3_right_content_11">
  326. <li class="part3_right_contentlist_11" v-for="(item, index) in 2">
  327. <NuxtLink to="#">
  328. 绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动绵阳市关工委在乡村振兴学校科普宣传活动普宣传活动
  329. </NuxtLink>
  330. </li>
  331. </ul>
  332. </div>
  333. </div>
  334. </div>
  335. <!-- 页脚部分 -->
  336. <HomeFoot1></HomeFoot1>
  337. </div>
  338. </template>
  339. <script setup>
  340. //获取生命周期
  341. import { HomeTopTenTitle } from '#components';
  342. import { onMounted } from 'vue';
  343. //获得跳转过来的id
  344. const route = useRoute();
  345. const routeId = route.params.id; //获得该页面的id
  346. const routeName = route.query.name; //获得该页面的名称
  347. //获取行政部门和地区
  348. const cityid = route.query.cityid;
  349. const depId = route.query.department_id;
  350. //获得axios
  351. const nuxtApp = useNuxtApp();
  352. const axios = nuxtApp.$axios;
  353. // 定义响应式数据
  354. const seoData = ref({
  355. title: '三农资讯网',
  356. description: '默认描述',
  357. keywords: '默认关键词',
  358. image: 'https://example.com/default-image.jpg'
  359. });
  360. const hoverStatus = ref(1)
  361. const qhPic = function (num) {
  362. console.log(num)
  363. hoverStatus.value = num;
  364. }
  365. //获得所有广告
  366. const adList = ref("");
  367. const aa = 'CATEGORY'
  368. const getadList = async () => {
  369. try {
  370. const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
  371. adList.value = response.data;
  372. } catch (error) {
  373. console.error(error);
  374. }
  375. }
  376. onMounted(() => {
  377. getadList()
  378. })
  379. // 在 onMounted 钩子中获取数据
  380. onMounted(async () => {
  381. // try {
  382. // const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${routeId}`);
  383. // const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
  384. // console.log(seoData.value.title)
  385. // // 更新 seoData
  386. // seoData.value = {
  387. // title: data.seo_title,
  388. // description: data.seo_description,
  389. // keywords: data.seo_keywords,
  390. // image: data.seo_image
  391. // };
  392. // console.log(seoData.value.title)
  393. // } catch (error) {
  394. // console.error('获取 SEO 数据失败:', error);
  395. // // 设置默认值
  396. // seoData.value = {
  397. // title: '三农资讯网',
  398. // description: '默认描述',
  399. // keywords: '默认关键词',
  400. // image: 'https://example.com/default-image.jpg'
  401. // };
  402. // }
  403. });
  404. // 监听 seoData 的变化,动态设置 SEO 字段
  405. watch(seoData, (newVal) => {
  406. if (newVal.title) { // 确保 title 有值
  407. useSeoMeta({
  408. title: newVal.title, // 使用动态值
  409. description: newVal.description,
  410. ogTitle: newVal.title,
  411. ogDescription: newVal.description,
  412. ogImage: newVal.image,
  413. twitterTitle: newVal.title,
  414. twitterDescription: newVal.description,
  415. twitterImage: newVal.image,
  416. keywords: newVal.keywords
  417. });
  418. }
  419. }, { immediate: true });
  420. //该页面上所有的导航池 转为动态数据
  421. const pageCategory = ref([]);
  422. //该页面上需要渲染的所有数据
  423. const pageData = ref([
  424. { id: 0, data: [], data2: [], title: "", cid: "" },
  425. { id: 1, data: [], title: "", cid: "" },
  426. { id: 2, data: [], title: "", cid: "" },
  427. { id: 3, data: [], title: "", cid: "" },
  428. { id: 4, data: [], title: "", cid: "" },
  429. { id: 5, data: [], title: "", cid: "" },
  430. { id: 6, data: [], title: "", cid: "" },
  431. { id: 7, data: [], title: "", cid: "" },
  432. { id: 8, data: [], title: "", cid: "" },
  433. { id: 9, data: [], title: "", cid: "" },
  434. { id: 10, data: [], title: "", cid: "" },
  435. { id: 10, data: [], title: "", cid: "" },
  436. {
  437. id: 11,
  438. title: "",
  439. data: [],
  440. data1: [],
  441. data2: [],
  442. data3: [],
  443. data4: [],
  444. category_id1: "",
  445. category_id2: "",
  446. category_id3: "",
  447. category_id4: "",
  448. title1: "",
  449. title2: "",
  450. title3: "",
  451. title4: "",
  452. cid: ""
  453. },
  454. { id: 12, data1: [], data2: [], data3: [], cid: "" },
  455. ])
  456. //第一种情况 直接获得二级导航
  457. //第一步:获得该分类下的所有二级导航
  458. const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
  459. //placeid 固定为1
  460. //pid 由上个页面带过来的1级导航id
  461. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  462. const getWebsiteModelCategory = async () => {
  463. try {
  464. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
  465. pageCategory.value = response.data;
  466. //给与板块标题
  467. for (let index in response.data) {
  468. pageData.value[index].title = response.data[index].name
  469. pageData.value[index].cid = response.data[index].category_id
  470. }
  471. console.log(pageData.value)
  472. console.log('pageCategory111111111111111', pageCategory.value)
  473. renderPage();
  474. } catch (error) {
  475. console.error(error);
  476. }
  477. }
  478. //第二种情况 用户搜索的二级导航
  479. const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
  480. //placeid 固定为1
  481. //pid 由上个页面带过来的1级导航id
  482. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  483. const selectWebsiteCategory = async () => {
  484. try {
  485. const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
  486. pageCategory.value = response.data;
  487. //给与板块标题
  488. for (let index in response.data) {
  489. pageData.value[index].title = response.data[index].name
  490. }
  491. console.log(pageData.value)
  492. console.log(pageCategory.value)
  493. renderPage2();
  494. } catch (error) {
  495. console.error(error);
  496. }
  497. }
  498. //第二步:获得对应分类下的数据
  499. const renderPage = function () {
  500. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  501. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  502. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  503. getWebsiteArticlesList(pageCategory.value[i].category_id, i)
  504. }
  505. }
  506. //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
  507. const renderPage2 = function () {
  508. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  509. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  510. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  511. getWebsiteArticlesList(pageCategory.value[i].id, i)
  512. }
  513. }
  514. //第三步循环获取数据
  515. const getWebsiteArticlesList = async (name, listType) => {
  516. //第一层
  517. //板块1 图文
  518. if (listType == 0) {
  519. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
  520. pageData.value[0].data = response.data
  521. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
  522. pageData.value[0].data2 = response2.data
  523. }
  524. //板块2 图文
  525. if (listType == 1) {
  526. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  527. pageData.value[1].data = response.data;
  528. }
  529. //第二层
  530. //板块3 图文
  531. if (listType == 2) {
  532. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  533. pageData.value[2].data = response.data;
  534. }
  535. //板块4 图文
  536. if (listType == 3) {
  537. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  538. pageData.value[3].data = response.data;
  539. }
  540. //板块5 图文
  541. if (listType == 4) {
  542. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  543. pageData.value[4].data = response.data;
  544. }
  545. //第三层
  546. //板块6 图文
  547. if (listType == 5) {
  548. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  549. pageData.value[5].data = response.data;
  550. }
  551. //板块7 图文
  552. if (listType == 6) {
  553. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  554. pageData.value[6].data = response.data;
  555. }
  556. //板块8 图文
  557. if (listType == 7) {
  558. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  559. pageData.value[7].data = response.data;
  560. }
  561. //板块9 图文
  562. if (listType == 8) {
  563. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  564. pageData.value[8].data = response.data;
  565. }
  566. //第四层
  567. //板块10 文字
  568. if (listType == 9) {
  569. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  570. pageData.value[9].data = response.data;
  571. }
  572. //板块11 文字
  573. if (listType == 10) {
  574. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  575. pageData.value[10].data = response.data;
  576. }
  577. //板块12 轮播图 图文 文字
  578. if (listType == 11) {
  579. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  580. pageData.value[11].data = response.data;
  581. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  582. pageData.value[11].data2 = response2.data;
  583. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  584. pageData.value[11].data3 = response3.data;
  585. }
  586. //第五层
  587. //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
  588. if (listType == 12) {
  589. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
  590. pageData.value[12].data = response.data;
  591. console.log("第一步获取父级id")
  592. console.log(pageCategory.value[12].children_count)
  593. console.log(pageCategory.value[12].category_id)
  594. //判断一下里面有没有子导航
  595. if (pageCategory.value[12].children_count != 0) {
  596. //开始请求子导航
  597. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
  598. console.log("第二步获取子级数量")
  599. console.log(response.data.length)
  600. //获得标题
  601. //判断里面有几个
  602. for (let i = 1; i <= response.data.length; i++) {
  603. if (i == 1) {
  604. pageData.value[12].title1 = response.data[0].name
  605. pageData.value[12].category_id1 = response.data[0].category_id
  606. }
  607. if (i == 2) {
  608. pageData.value[12].title2 = response.data[1].name
  609. pageData.value[12].category_id2 = response.data[1].category_id
  610. }
  611. if (i == 3) {
  612. pageData.value[12].title3 = response.data[2].name
  613. pageData.value[12].category_id3 = response.data[2].category_id
  614. }
  615. if (i == 4) {
  616. pageData.value[12].title4 = response.data[3].name
  617. pageData.value[12].category_id4 = response.data[3].category_id
  618. }
  619. }
  620. //获得内容
  621. //第三步:有几个就循环几次
  622. for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
  623. if (i == 1) {
  624. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
  625. pageData.value[12].data1 = response.data
  626. }
  627. if (i == 2) {
  628. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
  629. pageData.value[12].data2 = response.data
  630. }
  631. if (i == 3) {
  632. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
  633. pageData.value[12].data3 = response.data
  634. }
  635. if (i == 4) {
  636. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
  637. pageData.value[12].data4 = response.data
  638. }
  639. }
  640. }
  641. }
  642. //板块13 轮播图 图文 文字
  643. if (listType == 13) {
  644. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  645. pageData.value[13].data = response.data;
  646. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  647. pageData.value[13].data2 = response2.data;
  648. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  649. pageData.value[13].data3 = response3.data;
  650. }
  651. }
  652. let scienceTitleList = [
  653. {
  654. id: 1,
  655. title: "农产畅销"
  656. },
  657. {
  658. id: 2,
  659. title: "农业在线"
  660. },
  661. {
  662. id: 3,
  663. title: "农产行情"
  664. },
  665. {
  666. id: 4,
  667. title: "名优特产"
  668. }
  669. ]
  670. //鼠标移入标题时,下方内容会发生变化
  671. let changeUl = (index) => {
  672. // console.log(index);
  673. if (process.browser) {
  674. let scienceListBox = document.querySelector('.scienceListBox');
  675. let titleList = document.querySelectorAll('.title>span>a')
  676. for (let i = 0; i < titleList.length; i++) {
  677. titleList[i].className = ''
  678. }
  679. titleList[index].setAttribute('class', 'current')
  680. if (index == 0) {
  681. scienceListBox.style.left = 0
  682. } else if (index == 1) {
  683. scienceListBox.style.left = "-790px"
  684. } else if (index == 2) {
  685. scienceListBox.style.left = "-1580px"
  686. } else if (index == 3) {
  687. scienceListBox.style.left = "-2370px"
  688. }
  689. }
  690. }
  691. //显示哪个tabs
  692. let showTabs = ref(1)
  693. let qhtabs = function (number) {
  694. console.log(number)
  695. showTabs.value = number
  696. }
  697. //挂载成功钩子函数
  698. onMounted(() => {
  699. //判断一下应该走搜索还是直接走二级分类
  700. console.log(111111)
  701. console.log(cityid)
  702. console.log(cityid != undefined)
  703. console.log(depId != undefined)
  704. if (cityid != undefined || depId != undefined) {
  705. console.log(7777777777)
  706. console.log(cityid)
  707. console.log(depId)
  708. //获得用户搜索的导航
  709. selectWebsiteCategory()
  710. } else {
  711. console.log(888888888)
  712. //直接获得所有二级导航
  713. getWebsiteModelCategory()
  714. }
  715. })
  716. function getDays(time) {
  717. const date = new Date(time);
  718. const year = date.getFullYear();
  719. const month = date.getMonth() + 1;
  720. const day = date.getDate();
  721. return `${month}-${day}`;
  722. }
  723. </script>
  724. <style lang="less" scoped>
  725. // 一级标题
  726. .nav1 {
  727. width: 100%;
  728. height: 214px;
  729. background: #fff;
  730. .inner {
  731. width: 1200px;
  732. height: 214px;
  733. margin: 0 auto;
  734. .nav1_title {
  735. width: 1120px;
  736. height: 214px;
  737. margin-left: 40px;
  738. line-height: 217px;
  739. text-align: center;
  740. font-family: DingTalk JinBuTi, DingTalk JinBuTi;
  741. font-weight: 400;
  742. font-size: 50px;
  743. color: #6D2512;
  744. background: url(/_nuxt/public/index/title_bg.png) no-repeat 0;
  745. }
  746. }
  747. }
  748. .nav2top {
  749. width: 1250px;
  750. height: 3px;
  751. margin: 0 auto;
  752. background-color: #a01c0e;
  753. }
  754. .nav2btm {
  755. width: 1200px;
  756. height: 3px;
  757. margin: 0 auto;
  758. background-color: #a01c0e;
  759. }
  760. .nav2 {
  761. width: 100%;
  762. height: 48px;
  763. background-color: #a01c0e;
  764. .inner {
  765. width: 1250px;
  766. height: 48px;
  767. line-height: 48px;
  768. padding: 0 45px;
  769. margin: 0 auto;
  770. box-sizing: border-box;
  771. display: flex;
  772. justify-content: space-between;
  773. .titleList {
  774. font-family: Microsoft YaHei, Microsoft YaHei;
  775. font-weight: bold;
  776. font-size: 14px;
  777. color: #FFFFFF;
  778. .nav2_title {
  779. display: inline-block;
  780. font-family: Microsoft YaHei, Microsoft YaHei;
  781. font-weight: bold;
  782. font-size: 14px;
  783. color: #FFFFFF;
  784. }
  785. a {
  786. padding: 0 38px;
  787. color: #FFFFFF;
  788. border-left: 1px solid #7E1C11;
  789. }
  790. //鼠标点击后的样式
  791. .nav2_title_active {
  792. display: inline-block;
  793. font-family: Microsoft YaHei, Microsoft YaHei;
  794. font-weight: bold;
  795. font-size: 14px;
  796. color: #FFFFFF;
  797. border-bottom: 1px solid #FFFFFF;
  798. }
  799. }
  800. .titleList:hover {
  801. a {
  802. color: #a01c0e;
  803. .nav2_title {
  804. border-bottom: 1px solid #FFFFFF;
  805. }
  806. }
  807. }
  808. .home {
  809. font-family: Microsoft YaHei, Microsoft YaHei;
  810. font-weight: bold;
  811. font-size: 14px;
  812. color: #F8ECD2;
  813. a {
  814. color: #F8ECD2;
  815. margin-right: 39px;
  816. }
  817. }
  818. }
  819. }
  820. //第一部分
  821. .part1 {
  822. width: 100%;
  823. height: 585px;
  824. margin-top: 35px;
  825. .inner {
  826. width: 1200px;
  827. margin: 0 auto;
  828. .part1_left {
  829. float: left;
  830. width: 720px;
  831. .part1_title {
  832. width: 720px;
  833. height: 50px;
  834. line-height: 50px;
  835. .nav_part1_left {
  836. float: left;
  837. width: 100px;
  838. font-family: Microsoft YaHei, Microsoft YaHei;
  839. font-weight: 400;
  840. font-size: 20px;
  841. color: #333333;
  842. position: relative;
  843. a {
  844. color: #333333;
  845. }
  846. em {
  847. display: inline-block;
  848. width: 8px;
  849. height: 8px;
  850. background-color: #a01c0e;
  851. border-radius: 4px;
  852. position: absolute;
  853. top: 9px;
  854. right: 6px;
  855. }
  856. }
  857. }
  858. .part1_content {
  859. width: 720px;
  860. margin-top: 20px;
  861. .context_left {
  862. float: left;
  863. width: 350px;
  864. .top {
  865. width: 350px;
  866. img {
  867. width: 350px;
  868. height: 230px;
  869. }
  870. a .title1 {
  871. margin-top: 15px;
  872. width: 350px;
  873. height: 48px;
  874. display: -webkit-box;
  875. -webkit-box-orient: vertical;
  876. -webkit-line-clamp: 2;
  877. overflow: hidden;
  878. text-overflow: ellipsis;
  879. word-break: break-all;
  880. font-family: Microsoft YaHei, Microsoft YaHei;
  881. font-weight: bold;
  882. font-size: 18px;
  883. color: #333333;
  884. }
  885. }
  886. .top:hover {
  887. a .title1 {
  888. color: #a01c0e;
  889. }
  890. }
  891. .bottom {
  892. width: 350px;
  893. margin-top: 25px;
  894. .bottom_left {
  895. float: left;
  896. width: 165px;
  897. img {
  898. width: 165px;
  899. height: 96px;
  900. }
  901. a .title2 {
  902. margin-top: 10px;
  903. width: 165px;
  904. height: 48px;
  905. display: -webkit-box;
  906. -webkit-box-orient: vertical;
  907. -webkit-line-clamp: 2;
  908. overflow: hidden;
  909. text-overflow: ellipsis;
  910. word-break: break-all;
  911. font-family: Microsoft YaHei, Microsoft YaHei;
  912. font-weight: 400;
  913. font-size: 18px;
  914. color: #333333;
  915. }
  916. }
  917. .bottom_left:first-child {
  918. margin-right: 20px;
  919. }
  920. }
  921. .bottom_left:hover {
  922. a .title2 {
  923. color: #a01c0e;
  924. }
  925. }
  926. }
  927. .context_right {
  928. float: right;
  929. width: 350px;
  930. .rightContent {
  931. width: 350px;
  932. height: 230px;
  933. .topTitle1 {
  934. width: 345px;
  935. white-space: nowrap;
  936. overflow: hidden;
  937. text-overflow: ellipsis;
  938. font-family: Microsoft YaHei, Microsoft YaHei;
  939. font-weight: bold;
  940. font-size: 18px;
  941. color: #333333;
  942. a {
  943. color: #333333;
  944. }
  945. }
  946. .topTitle1:hover a {
  947. color: #a01c0e;
  948. }
  949. .context1 {
  950. margin-top: 27px;
  951. width: 345px;
  952. white-space: nowrap;
  953. overflow: hidden;
  954. text-overflow: ellipsis;
  955. font-family: Microsoft YaHei, Microsoft YaHei;
  956. font-weight: 400;
  957. font-size: 18px;
  958. color: #333333;
  959. a {
  960. color: #333333;
  961. }
  962. }
  963. .context1:hover a {
  964. color: #a01c0e;
  965. }
  966. }
  967. .rightContent:first-child {
  968. margin-bottom: 25px;
  969. }
  970. }
  971. }
  972. }
  973. .part1_right {
  974. float: right;
  975. width: 450px;
  976. // height: 1000px;
  977. .part1_right_title {
  978. width: 450px;
  979. height: 50px;
  980. line-height: 50px;
  981. .part1_right_title1_active {
  982. float: left;
  983. margin-right: 40px;
  984. font-family: Microsoft YaHei, Microsoft YaHei;
  985. font-weight: 400;
  986. font-size: 20px;
  987. color: #333333;
  988. position: relative;
  989. a {
  990. color: #333333;
  991. }
  992. .active_bg {
  993. display: inline-block;
  994. width: 8px;
  995. height: 8px;
  996. background-color: #a01c0e;
  997. border-radius: 4px;
  998. position: absolute;
  999. top: 7px;
  1000. right: -5px;
  1001. }
  1002. }
  1003. .part1_right_title1 {
  1004. float: left;
  1005. margin-right: 40px;
  1006. font-family: Microsoft YaHei, Microsoft YaHei;
  1007. font-weight: 400;
  1008. font-size: 20px;
  1009. color: #999999;
  1010. position: relative;
  1011. a {
  1012. color: #999999;
  1013. }
  1014. }
  1015. }
  1016. .part1_right_content {
  1017. width: 450px;
  1018. // height: 940px;
  1019. margin-top: 20px;
  1020. .part1_right_content_top {
  1021. float: left;
  1022. width: 220px;
  1023. height: 180px;
  1024. a img {
  1025. width: 220px;
  1026. height: 130px;
  1027. }
  1028. a .content_top_title2 {
  1029. display: inline-block;
  1030. width: 220px;
  1031. padding: 0 10px;
  1032. box-sizing: border-box;
  1033. white-space: nowrap;
  1034. overflow: hidden;
  1035. text-overflow: ellipsis;
  1036. font-family: Microsoft YaHei, Microsoft YaHei;
  1037. font-weight: 400;
  1038. font-size: 18px;
  1039. color: #333333;
  1040. margin-top: 10px;
  1041. }
  1042. }
  1043. .part1_right_content_top:hover {
  1044. a .content_top_title2 {
  1045. color: #a01c0e;
  1046. }
  1047. }
  1048. .part1_right_content_top:nth-child(2) {
  1049. margin-left: 10px;
  1050. }
  1051. .part1_right_content_bottom {
  1052. width: 450px;
  1053. height: 300px;
  1054. margin-top: 20px;
  1055. overflow: hidden;
  1056. .content_bottom_list {
  1057. width: 450px;
  1058. height: 22px;
  1059. line-height: 21px;
  1060. white-space: nowrap;
  1061. overflow: hidden;
  1062. text-overflow: ellipsis;
  1063. margin-top: 28px;
  1064. font-family: Microsoft YaHei, Microsoft YaHei;
  1065. font-weight: 400;
  1066. font-size: 18px;
  1067. color: #333333;
  1068. a {
  1069. color: #333333;
  1070. }
  1071. }
  1072. .content_bottom_list:hover {
  1073. a {
  1074. color: #a01c0e;
  1075. }
  1076. }
  1077. }
  1078. }
  1079. }
  1080. }
  1081. }
  1082. //第二部分
  1083. .part2 {
  1084. width: 100%;
  1085. overflow: hidden;
  1086. margin-bottom: 40px;
  1087. .inner {
  1088. width: 1200px;
  1089. margin: 0 auto;
  1090. .part2_left {
  1091. float: left;
  1092. width: 720px;
  1093. .part2_title {
  1094. width: 720px;
  1095. height: 50px;
  1096. line-height: 50px;
  1097. .nav_part2_left {
  1098. float: left;
  1099. width: 100px;
  1100. font-family: Microsoft YaHei, Microsoft YaHei;
  1101. font-weight: 400;
  1102. font-size: 20px;
  1103. color: #333333;
  1104. position: relative;
  1105. a {
  1106. color: #333333;
  1107. }
  1108. em {
  1109. display: inline-block;
  1110. width: 8px;
  1111. height: 8px;
  1112. background-color: #a01c0e;
  1113. border-radius: 4px;
  1114. position: absolute;
  1115. top: 9px;
  1116. right: 6px;
  1117. }
  1118. }
  1119. }
  1120. .part2_content {
  1121. width: 720px;
  1122. margin-top: 20px;
  1123. .part2_content_left {
  1124. float: left;
  1125. width: 350px;
  1126. .content_a {
  1127. width: 350px;
  1128. height: 230px;
  1129. // margin-bottom: 25px;
  1130. .topTitleaa {
  1131. width: 345px;
  1132. white-space: nowrap;
  1133. overflow: hidden;
  1134. text-overflow: ellipsis;
  1135. font-family: Microsoft YaHei, Microsoft YaHei;
  1136. font-weight: bold;
  1137. font-size: 18px;
  1138. color: #333333;
  1139. a {
  1140. color: #333333;
  1141. }
  1142. }
  1143. .topTitleaa:hover a {
  1144. color: #a01c0e;
  1145. }
  1146. .context111 {
  1147. margin-top: 27px;
  1148. width: 345px;
  1149. white-space: nowrap;
  1150. overflow: hidden;
  1151. text-overflow: ellipsis;
  1152. font-family: Microsoft YaHei, Microsoft YaHei;
  1153. font-weight: 400;
  1154. font-size: 18px;
  1155. color: #333333;
  1156. a {
  1157. color: #333333;
  1158. }
  1159. }
  1160. .context111:hover a {
  1161. color: #a01c0e;
  1162. }
  1163. }
  1164. .content_a:first-child {
  1165. margin-bottom: 25px;
  1166. }
  1167. }
  1168. .part2_content_right {
  1169. float: right;
  1170. width: 350px;
  1171. height: 440px;
  1172. .right_top {
  1173. width: 350px;
  1174. height: 300px;
  1175. a img {
  1176. width: 350px;
  1177. height: 230px;
  1178. }
  1179. a .title11 {
  1180. margin-top: 15px;
  1181. width: 350px;
  1182. height: 48px;
  1183. display: -webkit-box;
  1184. -webkit-box-orient: vertical;
  1185. -webkit-line-clamp: 2;
  1186. overflow: hidden;
  1187. text-overflow: ellipsis;
  1188. word-break: break-all;
  1189. font-family: Microsoft YaHei, Microsoft YaHei;
  1190. font-weight: bold;
  1191. font-size: 18px;
  1192. color: #333333;
  1193. }
  1194. }
  1195. .right_top:hover {
  1196. color: #a01c0e;
  1197. a .title11 {
  1198. color: #a01c0e;
  1199. }
  1200. }
  1201. .right_bottom {
  1202. width: 350px;
  1203. height: 165px;
  1204. margin-top: 20px;
  1205. .bottom_left {
  1206. float: left;
  1207. width: 165px;
  1208. height: 130px;
  1209. a img {
  1210. width: 165px;
  1211. height: 96px;
  1212. }
  1213. a .title22 {
  1214. margin-top: 10px;
  1215. width: 165px;
  1216. height: 48px;
  1217. display: -webkit-box;
  1218. -webkit-box-orient: vertical;
  1219. -webkit-line-clamp: 2;
  1220. overflow: hidden;
  1221. text-overflow: ellipsis;
  1222. word-break: break-all;
  1223. font-family: Microsoft YaHei, Microsoft YaHei;
  1224. font-weight: 400;
  1225. font-size: 18px;
  1226. color: #333333;
  1227. }
  1228. }
  1229. .bottom_left:hover {
  1230. color: #a01c0e;
  1231. a .title22 {
  1232. color: #a01c0e;
  1233. }
  1234. }
  1235. .bottom_left:first-child {
  1236. margin-right: 20px;
  1237. }
  1238. }
  1239. }
  1240. }
  1241. }
  1242. .part2_right {
  1243. float: right;
  1244. width: 450px;
  1245. // height: 1000px;
  1246. .part2_right_title {
  1247. width: 450px;
  1248. height: 50px;
  1249. line-height: 50px;
  1250. .part2_right_title1_active {
  1251. float: left;
  1252. margin-right: 40px;
  1253. font-family: Microsoft YaHei, Microsoft YaHei;
  1254. font-weight: 400;
  1255. font-size: 20px;
  1256. color: #333333;
  1257. position: relative;
  1258. a {
  1259. color: #333333;
  1260. }
  1261. .active_bg11 {
  1262. display: inline-block;
  1263. width: 8px;
  1264. height: 8px;
  1265. background-color: #a01c0e;
  1266. border-radius: 4px;
  1267. position: absolute;
  1268. top: 7px;
  1269. right: -5px;
  1270. }
  1271. }
  1272. .part2_right_title1 {
  1273. float: left;
  1274. margin-right: 40px;
  1275. font-family: Microsoft YaHei, Microsoft YaHei;
  1276. font-weight: 400;
  1277. font-size: 20px;
  1278. color: #999999;
  1279. position: relative;
  1280. a {
  1281. color: #999999;
  1282. }
  1283. }
  1284. }
  1285. .part2_right_content {
  1286. width: 450px;
  1287. margin-top: 20px;
  1288. .part2_right_content_top {
  1289. float: left;
  1290. width: 220px;
  1291. height: 180px;
  1292. a img {
  1293. width: 220px;
  1294. height: 130px;
  1295. }
  1296. a .content_top_title22 {
  1297. display: inline-block;
  1298. width: 220px;
  1299. padding: 0 10px;
  1300. box-sizing: border-box;
  1301. white-space: nowrap;
  1302. overflow: hidden;
  1303. text-overflow: ellipsis;
  1304. font-family: Microsoft YaHei, Microsoft YaHei;
  1305. font-weight: 400;
  1306. font-size: 18px;
  1307. color: #333333;
  1308. margin-top: 10px;
  1309. }
  1310. }
  1311. .part2_right_content_top:hover {
  1312. a .content_top_title22 {
  1313. color: #a01c0e;
  1314. }
  1315. }
  1316. .part2_right_content_top:nth-child(2) {
  1317. margin-left: 10px;
  1318. }
  1319. .part2_right_content_bottom {
  1320. width: 450px;
  1321. height: 300px;
  1322. margin-top: 20px;
  1323. overflow: hidden;
  1324. .content_bottom_list {
  1325. width: 450px;
  1326. height: 22px;
  1327. line-height: 21px;
  1328. white-space: nowrap;
  1329. overflow: hidden;
  1330. text-overflow: ellipsis;
  1331. margin-top: 28px;
  1332. font-family: Microsoft YaHei, Microsoft YaHei;
  1333. font-weight: 400;
  1334. font-size: 18px;
  1335. color: #333333;
  1336. a {
  1337. color: #333333;
  1338. }
  1339. }
  1340. .content_bottom_list:hover {
  1341. a {
  1342. color: #a01c0e;
  1343. }
  1344. }
  1345. }
  1346. }
  1347. }
  1348. }
  1349. }
  1350. //第三部分
  1351. .part3 {
  1352. width: 100%;
  1353. height: 1200px;
  1354. margin-top: 35px;
  1355. margin-bottom: 40px;
  1356. .inner {
  1357. width: 1200px;
  1358. height: 1200px;
  1359. background-color: #fff;
  1360. .part3_left {
  1361. float: left;
  1362. .part3_left_top {
  1363. width: 720px;
  1364. overflow: hidden;
  1365. .part3_leftTitle {
  1366. width: 720px;
  1367. height: 50px;
  1368. line-height: 50px;
  1369. .part3_left_title:first-child {
  1370. float: left;
  1371. margin-right: 20px;
  1372. width: 100px;
  1373. height: 50px;
  1374. line-height: 50px;
  1375. position: relative;
  1376. font-family: Microsoft YaHei, Microsoft YaHei;
  1377. font-weight: 400;
  1378. font-size: 20px;
  1379. color: #333333;
  1380. a {
  1381. color: #333333;
  1382. }
  1383. em {
  1384. display: inline-block;
  1385. width: 8px;
  1386. height: 8px;
  1387. background-color: #a01c0e;
  1388. border-radius: 4px;
  1389. position: absolute;
  1390. top: 9px;
  1391. right: 6px;
  1392. }
  1393. }
  1394. .part3_left_title {
  1395. float: left;
  1396. margin-right: 20px;
  1397. width: 100px;
  1398. height: 50px;
  1399. line-height: 50px;
  1400. position: relative;
  1401. font-family: Microsoft YaHei, Microsoft YaHei;
  1402. font-weight: 400;
  1403. font-size: 20px;
  1404. color: #999999;
  1405. a {
  1406. color: #999999;
  1407. }
  1408. // em{
  1409. // display: inline-block;
  1410. // width: 8px;
  1411. // height: 8px;
  1412. // background-color: #a01c0e;
  1413. // border-radius: 4px;
  1414. // position: absolute;
  1415. // top: 9px;
  1416. // right: 6px;
  1417. // }
  1418. }
  1419. }
  1420. .part3_left_content {
  1421. width: 720px;
  1422. margin-top: 20px;
  1423. .part3_left_content_top {
  1424. .content_top_left {
  1425. float: left;
  1426. width: 350px;
  1427. .part3_photo_text {
  1428. width: 350px;
  1429. position: relative;
  1430. img {
  1431. width: 350px;
  1432. height: 230px;
  1433. }
  1434. .littleTips {
  1435. display: inline-block;
  1436. width: 50px;
  1437. height: 26px;
  1438. line-height: 26px;
  1439. text-align: center;
  1440. background-color: #a01c0e;
  1441. font-family: Microsoft YaHei, Microsoft YaHei;
  1442. font-weight: 400;
  1443. font-size: 16px;
  1444. color: #fff;
  1445. position: absolute;
  1446. top: 0;
  1447. right: 10px;
  1448. }
  1449. .part3_text {
  1450. display: inline-block;
  1451. width: 350px;
  1452. height: 26px;
  1453. white-space: nowrap;
  1454. overflow: hidden;
  1455. text-overflow: ellipsis;
  1456. font-family: Microsoft YaHei, Microsoft YaHei;
  1457. font-weight: bold;
  1458. font-size: 18px;
  1459. color: #333333;
  1460. margin-top: 15px;
  1461. }
  1462. }
  1463. .part3_photo_text:hover {
  1464. .part3_text {
  1465. color: #a01c0e;
  1466. }
  1467. }
  1468. .part3_content {
  1469. width: 350px;
  1470. .part3_content_list:first-child {
  1471. width: 350px;
  1472. height: 25px;
  1473. white-space: nowrap;
  1474. overflow: hidden;
  1475. text-overflow: ellipsis;
  1476. font-family: Microsoft YaHei, Microsoft YaHei;
  1477. font-weight: bold;
  1478. font-size: 18px;
  1479. color: #333333;
  1480. line-height: 22px;
  1481. margin-top: 35px;
  1482. a {
  1483. color: #333333;
  1484. }
  1485. }
  1486. .part3_content_list:first-child:hover {
  1487. a {
  1488. color: #a01c0e;
  1489. }
  1490. }
  1491. .part3_content_list:last-child {
  1492. margin-bottom: 0;
  1493. }
  1494. .part3_content_list {
  1495. width: 350px;
  1496. height: 25px;
  1497. white-space: nowrap;
  1498. overflow: hidden;
  1499. text-overflow: ellipsis;
  1500. font-family: Microsoft YaHei, Microsoft YaHei;
  1501. font-weight: 400;
  1502. font-size: 18px;
  1503. color: #333333;
  1504. line-height: 22px;
  1505. margin-bottom: 27px;
  1506. a {
  1507. color: #333333;
  1508. }
  1509. }
  1510. .part3_content_list:hover {
  1511. a {
  1512. color: #a01c0e;
  1513. }
  1514. }
  1515. }
  1516. }
  1517. .content_top_right {
  1518. float: left;
  1519. width: 350px;
  1520. height: 542px;
  1521. border: 1px solid #D9D9D9;
  1522. margin-left: 20px;
  1523. padding: 30px 25px;
  1524. box-sizing: border-box;
  1525. .content_right_list {
  1526. width: 350px;
  1527. height: 58px;
  1528. line-height: 58px;
  1529. margin-bottom: 48px;
  1530. .part3_time {
  1531. float: left;
  1532. width: 77px;
  1533. height: 58px;
  1534. color: #a01c0e;
  1535. .month {
  1536. font-family: Microsoft YaHei, Microsoft YaHei;
  1537. font-weight: 400;
  1538. font-size: 26px;
  1539. color: #A01C0E;
  1540. line-height: 30px;
  1541. }
  1542. .xiegang {
  1543. font-size: 22px;
  1544. font-weight: 400;
  1545. }
  1546. .day {
  1547. font-family: Microsoft YaHei, Microsoft YaHei;
  1548. font-weight: 400;
  1549. font-size: 16px;
  1550. color: #A01C0E;
  1551. line-height: 19px;
  1552. }
  1553. }
  1554. .time_left_content {
  1555. float: left;
  1556. width: 231px;
  1557. height: 58px;
  1558. display: -webkit-box;
  1559. -webkit-box-orient: vertical;
  1560. -webkit-line-clamp: 2;
  1561. overflow: hidden;
  1562. text-overflow: ellipsis;
  1563. word-break: break-all;
  1564. line-height: 22px;
  1565. padding-top: 12px;
  1566. box-sizing: border-box;
  1567. font-family: Microsoft YaHei, Microsoft YaHei;
  1568. font-weight: 400;
  1569. font-size: 18px;
  1570. color: #333333;
  1571. border-left: 1px solid #D9D9D9;
  1572. padding-left: 22px;
  1573. }
  1574. }
  1575. .content_right_list:hover {
  1576. .time_left_content {
  1577. color: #a01c0e;
  1578. }
  1579. }
  1580. }
  1581. }
  1582. }
  1583. }
  1584. .part3_left_bottom {
  1585. width: 720px;
  1586. margin-top: 25px;
  1587. .part3_leftTitle1 {
  1588. width: 720px;
  1589. height: 50px;
  1590. line-height: 50px;
  1591. margin-bottom: 25px;
  1592. .part3_left_title:first-child {
  1593. float: left;
  1594. margin-right: 20px;
  1595. width: 100px;
  1596. height: 50px;
  1597. line-height: 50px;
  1598. position: relative;
  1599. font-family: Microsoft YaHei, Microsoft YaHei;
  1600. font-weight: 400;
  1601. font-size: 20px;
  1602. color: #333333;
  1603. a {
  1604. color: #333333;
  1605. }
  1606. em {
  1607. display: inline-block;
  1608. width: 8px;
  1609. height: 8px;
  1610. background-color: #a01c0e;
  1611. border-radius: 4px;
  1612. position: absolute;
  1613. top: 9px;
  1614. right: 6px;
  1615. }
  1616. }
  1617. .part3_left_title {
  1618. float: left;
  1619. margin-right: 20px;
  1620. width: 100px;
  1621. height: 50px;
  1622. line-height: 50px;
  1623. position: relative;
  1624. font-family: Microsoft YaHei, Microsoft YaHei;
  1625. font-weight: 400;
  1626. font-size: 20px;
  1627. color: #999999;
  1628. a {
  1629. color: #999999;
  1630. }
  1631. // em{
  1632. // display: inline-block;
  1633. // width: 8px;
  1634. // height: 8px;
  1635. // background-color: #a01c0e;
  1636. // border-radius: 4px;
  1637. // position: absolute;
  1638. // top: 9px;
  1639. // right: 6px;
  1640. // }
  1641. }
  1642. }
  1643. .part3_left_content1 {
  1644. width: 720px;
  1645. .content_bottom_left {
  1646. float: left;
  1647. width: 350px;
  1648. // height: 350px;
  1649. .content_top {
  1650. width: 350px;
  1651. img {
  1652. width: 350px;
  1653. height: 230px;
  1654. }
  1655. .part3_text {
  1656. display: inline-block;
  1657. width: 350px;
  1658. height: 50px;
  1659. line-height: 22px;
  1660. display: -webkit-box;
  1661. -webkit-box-orient: vertical;
  1662. -webkit-line-clamp: 2;
  1663. overflow: hidden;
  1664. text-overflow: ellipsis;
  1665. word-break: break-all;
  1666. margin-top: 15px;
  1667. font-family: Microsoft YaHei, Microsoft YaHei;
  1668. font-weight: bold;
  1669. font-size: 18px;
  1670. color: #333333
  1671. }
  1672. }
  1673. .content_top:hover {
  1674. .part3_text {
  1675. color: #a01c0e;
  1676. }
  1677. }
  1678. .content_bottom {
  1679. width: 350px;
  1680. margin-top: 20px;
  1681. .content_bottom_1 {
  1682. float: left;
  1683. width: 165px;
  1684. img {
  1685. width: 165px;
  1686. height: 96px;
  1687. }
  1688. .part3_text {
  1689. display: inline-block;
  1690. width: 165px;
  1691. height: 44px;
  1692. line-height: 22px;
  1693. display: -webkit-box;
  1694. -webkit-box-orient: vertical;
  1695. -webkit-line-clamp: 2;
  1696. overflow: hidden;
  1697. text-overflow: ellipsis;
  1698. word-break: break-all;
  1699. font-family: Microsoft YaHei, Microsoft YaHei;
  1700. font-weight: 400;
  1701. font-size: 18px;
  1702. color: #333333;
  1703. margin-top: 10px;
  1704. }
  1705. }
  1706. .content_bottom_1:hover {
  1707. .part3_text {
  1708. color: #a01c0e;
  1709. }
  1710. }
  1711. .content_bottom_1:first-child {
  1712. margin-right: 20px;
  1713. }
  1714. }
  1715. }
  1716. .content_bottom_right {
  1717. float: left;
  1718. margin-left: 20px;
  1719. width: 350px;
  1720. .bottom_content_1 {
  1721. width: 350px;
  1722. .bottom_content_list:first-child {
  1723. font-weight: bold;
  1724. }
  1725. .bottom_content_list {
  1726. width: 350px;
  1727. height: 25px;
  1728. white-space: nowrap;
  1729. overflow: hidden;
  1730. text-overflow: ellipsis;
  1731. font-family: Microsoft YaHei, Microsoft YaHei;
  1732. font-weight: 400;
  1733. font-size: 18px;
  1734. color: #333333;
  1735. line-height: 21px;
  1736. margin-bottom: 25px;
  1737. a {
  1738. color: #333333;
  1739. }
  1740. }
  1741. .bottom_content_list:hover {
  1742. a {
  1743. color: #a01c0e;
  1744. }
  1745. }
  1746. }
  1747. .bottom_content_1:first-child {
  1748. margin-bottom: 20px;
  1749. }
  1750. .bottom_content_1:last-child {
  1751. .bottom_content_list:last-child {
  1752. margin-bottom: 0;
  1753. }
  1754. }
  1755. }
  1756. }
  1757. }
  1758. }
  1759. .part3_right {
  1760. float: right;
  1761. width: 451px;
  1762. .part3_rightTitle {
  1763. width: 451px;
  1764. height: 50px;
  1765. line-height: 50px;
  1766. .part3_right_title:first-child {
  1767. float: left;
  1768. margin-right: 20px;
  1769. width: 100px;
  1770. height: 50px;
  1771. line-height: 50px;
  1772. position: relative;
  1773. font-family: Microsoft YaHei, Microsoft YaHei;
  1774. font-weight: 400;
  1775. font-size: 20px;
  1776. color: #333333;
  1777. a {
  1778. color: #333333;
  1779. }
  1780. em {
  1781. display: inline-block;
  1782. width: 8px;
  1783. height: 8px;
  1784. background-color: #a01c0e;
  1785. border-radius: 4px;
  1786. position: absolute;
  1787. top: 9px;
  1788. right: 6px;
  1789. }
  1790. }
  1791. .part3_right_title {
  1792. float: left;
  1793. margin-right: 20px;
  1794. width: 100px;
  1795. height: 50px;
  1796. line-height: 50px;
  1797. position: relative;
  1798. font-family: Microsoft YaHei, Microsoft YaHei;
  1799. font-weight: 400;
  1800. font-size: 20px;
  1801. color: #999999;
  1802. a {
  1803. color: #999999;
  1804. }
  1805. // em{
  1806. // display: inline-block;
  1807. // width: 8px;
  1808. // height: 8px;
  1809. // background-color: #a01c0e;
  1810. // border-radius: 4px;
  1811. // position: absolute;
  1812. // top: 9px;
  1813. // right: 6px;
  1814. // }
  1815. }
  1816. .rightMore {
  1817. float: right;
  1818. font-family: Microsoft YaHei, Microsoft YaHei;
  1819. font-weight: 400;
  1820. font-size: 12px;
  1821. color: #999999;
  1822. a {
  1823. color: #999999;
  1824. }
  1825. }
  1826. }
  1827. .part3_right_content_top {
  1828. width: 451px;
  1829. margin-top: 20px;
  1830. .part3_right_contentlist_top {
  1831. font-family: Microsoft YaHei, Microsoft YaHei;
  1832. font-weight: 400;
  1833. font-size: 18px;
  1834. color: #333333;
  1835. width: 425px;
  1836. height: 25px;
  1837. white-space: nowrap;
  1838. overflow: hidden;
  1839. text-overflow: ellipsis;
  1840. margin-bottom: 25px;
  1841. a {
  1842. color: #333333;
  1843. }
  1844. .numStyle {
  1845. display: inline-block;
  1846. width: 22px;
  1847. height: 22px;
  1848. background-color: #f6f6f6;
  1849. text-align: center;
  1850. margin-right: 20px;
  1851. font-family: Protest Strike, Protest Strike;
  1852. font-weight: 400;
  1853. font-size: 16px;
  1854. color: #CCCCCC;
  1855. border-radius: 4px;
  1856. }
  1857. }
  1858. .part3_right_contentlist_top:hover{
  1859. color: #a01c0e;
  1860. a {
  1861. color: #a01c0e;
  1862. }
  1863. }
  1864. .part3_right_contentlist_top:nth-child(1) {
  1865. .numStyle {
  1866. background-color: #a01c0e;
  1867. color: #fff;
  1868. }
  1869. }
  1870. .part3_right_contentlist_top:nth-child(2) {
  1871. .numStyle {
  1872. background-color: #FFC62E;
  1873. color: #fff;
  1874. }
  1875. }
  1876. .part3_right_contentlist_top:nth-child(3) {
  1877. .numStyle {
  1878. background-color: #e98008;
  1879. color: #fff;
  1880. }
  1881. }
  1882. .part3_right_contentlist_top:last-child {
  1883. margin-bottom: 10px;
  1884. }
  1885. }
  1886. .part3_photo_text_right {
  1887. width: 451px;
  1888. height: 120px;
  1889. margin-top: 35px;
  1890. margin-bottom: 35px;
  1891. background-color: #f6f3f0;
  1892. .part3_text11 {
  1893. float: left;
  1894. width: 271px;
  1895. height: 96px;
  1896. display: -webkit-box;
  1897. -webkit-box-orient: vertical;
  1898. -webkit-line-clamp: 3;
  1899. overflow: hidden;
  1900. text-overflow: ellipsis;
  1901. word-break: break-all;
  1902. font-family: Microsoft YaHei, Microsoft YaHei;
  1903. font-weight: 400;
  1904. font-size: 18px;
  1905. color: #333333;
  1906. padding: 25px 20px;
  1907. box-sizing: border-box;
  1908. }
  1909. img {
  1910. float: left;
  1911. width: 180px;
  1912. height: 120px;
  1913. }
  1914. }
  1915. .part3_photo_text_right:hover {
  1916. color: #a01c0e;
  1917. .part3_text11{
  1918. color: #a01c0e;
  1919. }
  1920. }
  1921. .part3_right_content_11 {
  1922. width: 451px;
  1923. .part3_right_contentlist_11 {
  1924. width: 451px;
  1925. height: 25px;
  1926. white-space: nowrap;
  1927. overflow: hidden;
  1928. text-overflow: ellipsis;
  1929. font-family: Microsoft YaHei, Microsoft YaHei;
  1930. font-weight: 400;
  1931. font-size: 18px;
  1932. color: #333333;
  1933. line-height: 21px;
  1934. .erjibiaoti {
  1935. display: inline-block;
  1936. width: 87px;
  1937. height: 24px;
  1938. font-family: Microsoft YaHei, Microsoft YaHei;
  1939. font-weight: 400;
  1940. font-size: 18px;
  1941. color: #A01C0E;
  1942. border-right: #D3D5D8 1px solid;
  1943. margin-right: 10px;
  1944. }
  1945. a {
  1946. color: #333333;
  1947. }
  1948. }
  1949. .part3_right_contentlist_11:hover {
  1950. color: #a01c0e;
  1951. a {
  1952. color: #a01c0e;
  1953. }
  1954. }
  1955. .part3_right_contentlist_11:first-child {
  1956. margin-bottom: 25px;
  1957. }
  1958. }
  1959. }
  1960. }
  1961. }
  1962. </style>